home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / mach10.zip / COMMON.PAS < prev    next >
Pascal/Delphi Source File  |  1990-07-25  |  8KB  |  216 lines

  1. unit common;
  2.  
  3. { Common data declarations and procedures used for bbs }
  4.  
  5. interface
  6. uses crt,                             { Turbo Pascal standard crt unit  }
  7.  
  8.      dos,                             { Turbo Pascal standard dos unit  }
  9.  
  10.      config,                          { Procedures for reading the con- }
  11.                                       { figuration file. Also contains  }
  12.                                       { configuration variables         }
  13.  
  14.      scottlib;                        { Misc. Procedures and functions  }
  15.  
  16. const
  17.  name= 'Mach-10 bbs';
  18.  v='version';
  19.  version='2.32ß';
  20.  copywrit= 'Copywrite (C) 1988,89,90';
  21.  by='by';
  22.  author='Scott Baker & Jonathan Woods';
  23.  SizeFileIndex=2000;
  24. type
  25.  hourtype= array[0..23] of word;
  26.  menutype= (Main, Message, Files, Sigop, Util);
  27.  sextype= (Male, Female);
  28.  graphtype= (None, Ascii, Ansic, Music);
  29.  msg_save_type = array[1..200] of word;
  30.  mem_type = array[1..200] of byte;
  31.  datetype= string[6];
  32.  node_rec= record
  33.             active: boolean;
  34.             chatting: boolean;
  35.             avail: boolean;
  36.             name: string[30];
  37.             text: string[80];
  38.             read: array[1..20] of boolean;
  39.             channel: byte;
  40.             paged: byte;
  41.             lastflink: word;
  42.             TimeOn: string[20];
  43.             Access: byte;
  44.             timeleft: byte;
  45.             blah: array[1..255] of byte;
  46.            end;
  47.  mtime_rec = record
  48.              user_Rec_num: word;
  49.              hr,mn,sec,sec100: word;
  50.              com_port: byte;
  51.              baud_rate: word;
  52.              local: boolean;
  53.             end;
  54.  user_Rec= record
  55.             name: string[30];
  56.             alias: string[20];
  57.             password: string[10];
  58.             access: byte;
  59.             logons: word;
  60.             last_called: datetype;
  61.             graphics: graphtype;
  62.             elapsed_today: byte;
  63.  
  64.             address: string[40];      { Personal information }
  65.             city: string[10];
  66.             state: string[2];
  67.             zip: string[5];
  68.             voice_phone: string[10];
  69.             data_phone: string[10];
  70.             sex: sextype;
  71.             age: byte;
  72.             comp_type: byte;
  73.  
  74.             post: word;               { Statistical info }
  75.             post_time: word;
  76.             read: word;
  77.             read_time: word;
  78.             downloads: word;
  79.             download_k: word;
  80.             download_time: word;
  81.             uploads: word;
  82.             upload_k: word;
  83.             upload_time: word;
  84.             doors: word;
  85.             door_time: word;
  86.             total_time: longint;
  87.  
  88.             msg_saves: msg_save_type; { All message area lastread pointers }
  89.             membership: mem_type;     { Membership to message bases        }
  90.  
  91.             credit: byte;             { USER NETMAIL }
  92.  
  93.             protocol_type: char;      { Default protocol type }
  94.  
  95.             flags: word;              { Flag byte: defined as follows }
  96.                                       { 1 - Validated                 }
  97.                                       { 2 - eXpert                    }
  98.                                       { 3 - Visual editor on          }
  99.                                       { 4 - Fast-keys                 }
  100.                                       { 5 - Prompt bell enabled       }
  101.                                       { 6 - YooHoo                    }
  102.                                       { 7 - 40 column mode            }
  103.                                       { 8 - more prompt               }
  104.                                       { 9 - color active              }
  105.                                       {10 - Spy                       }
  106.                                       {11 - Top x Uploader            }
  107.                                       {12 - Top x Caller              }
  108.                                       {13 - Top x Poster              }
  109.            end;
  110.  
  111.  analizer_Rec = record
  112.                  date: datetype;
  113.  
  114.                  time_elapsed: longint; { Statistics - time              }
  115.                  time_dload: longint;
  116.                  time_uload: longint;
  117.                  time_doors: longint;
  118.                  time_read: longint;
  119.                  time_post: longint;
  120.  
  121.                  downloads: word;    { Statistics - countables        }
  122.                  uploads: word;
  123.                  doors: word;
  124.                  post: word;
  125.                  read: word;
  126.                  sysop_page: word;
  127.  
  128.                  download_k: word;
  129.                  upload_k: word;
  130.  
  131.                  logons: word;       { Logging on and logging off     }
  132.                  logoffs: word;
  133.                  sleeps: word;
  134.                  carrier_drops: word;
  135.  
  136.                  conferences: array[1..200] of word;
  137.                  door: array[1..200] of word;
  138.                  areas: array[1..200] of word;
  139.                  prots: array[1..20] of word;
  140.                  hours: hourtype;
  141.  
  142.                  local: word;
  143.                  baud300: word;
  144.                  baud1200: word;
  145.                  baud2400: word;
  146.                  baud4800: word;
  147.                  baud9600: word;
  148.  
  149.                  male: word;
  150.                  female: word;
  151.                  messagestats: array[1..255] of word;
  152.                  doorstats: array[1..255] of word;
  153.                  filestats: array[1..255] of word;
  154.                 end;
  155.  
  156.  file_rec = record
  157.              name: string[8];        { Filename - 8 bytes             }
  158.              ext: string[3];         { extension - 3 bytes            }
  159.              uploader: string[25];   { Who uploaded it                }
  160.              size: longint;          { Size (integer)                 }
  161.              date: datetype;         { The date                       }
  162.              area: byte;             { where it's stored              }
  163.              desc: string[50];       { What it is                     }
  164.              acc: byte;
  165.             end;
  166.  
  167.  file_index = record
  168.                name: string[8];        { Filename - 8 bytes             }
  169.                ext: string[3];         { extension - 3 bytes            }
  170.                date: datetype;         { The date                       }
  171.                area: byte;             { where it's stored              }
  172.               end;
  173.  
  174.  index_array= array[0..SizeFileIndex] of file_index;
  175.  index_ptr= ^index_array;
  176.  MarkPtr= ^Marked_rec;
  177.  Marked_rec = record
  178.                areanum: word;
  179.                num: word;
  180.                next, prev: MarkPtr;
  181.               end;
  182. var
  183.  FirstMark, Lastmark: markPtr;
  184.  SysopMessages: msg_save_type;
  185.  findex: index_ptr;
  186.  index_made: boolean;
  187.  returning_from_door: boolean;
  188.  users: file of user_rec;            { Catalog of all users           }
  189.  filecat: file of file_rec;          { Catalog of all D/L files       }
  190.  callers: text;                      { Caller log (text)              }
  191.  analizer: file of analizer_rec;     { Call analizer file             }
  192.  
  193.  current_menu_number: byte;          { Current menu number            }
  194.  
  195.  current_access: access_def_entry;   { Access level of user           }
  196.  
  197.  user: user_Rec;                     { Current user on the system     }
  198.  userptr: word;                      { Word pointer to users record   }
  199.  
  200.  save_user: boolean;                 { True if ok to write rec on exit}
  201.  
  202.  bulletin_file_name: string;         { Name and path of the bulletins }
  203.  num_bulletins: byte;                { Number of bulletins            }
  204.  
  205.  Current_area: Conference_def_entry; { Name of the current conf area  }
  206.  
  207.  goodbye_user: boolean;              { True if user has used goodbye  }
  208.  
  209.  stats: analizer_Rec;
  210.  
  211.  nodes: file of node_rec;
  212.  current_node: node_Rec;
  213.  
  214. implementation
  215. end.
  216.